
package gist;

import java.util.Random;

import org.apache.commons.lang.time.DurationFormatUtils;

/**
 * @describe:计算时间
 * @note：
 * @knowledge
 * @author:gss
 * @create_time: 2016-2-19
 */
public class CalculateTime {

    public static void main(String[] args) {
        long a = System.currentTimeMillis();
        try {
            Thread.sleep(new Random().nextInt(100000));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(DurationFormatUtils.formatPeriod(a, System.currentTimeMillis(), "HH:mm:ss"));
    }
}
